<template>
  <div>
    <el-button @click="lianjie">连接</el-button>
    <el-button @click="duka">读卡</el-button>
  </div>
</template>

<script>

export default {
  data() {
    return {

    };
  },
  mounted() {

  },
  methods: {
lianjie(){
  const api = "http://127.0.0.1:19196/OpenDevice";
  this.$axios({
    url: api,
    method: "get",
    //用于表示用户代理是否在跨域请求的情况下从其他域中发送cookies
    //  withCredentials:true,//默认为false
  }).then((res) => {
    console.log(res);
  })
},
    duka(){
      const api = "http://127.0.0.1:19196/readcard";
      this.$axios({
        url: api,
        method: "get",
        //用于表示用户代理是否在跨域请求的情况下从其他域中发送cookies
        //  withCredentials:true,//默认为false
      }).then((res) => {
        console.log(res);
      })
    }



  }
};
</script>

